package com.fearless.demo02;

import java.util.Date;

public class UserProxy implements UserService {
    private UserService service;

    public void setService(UserService service) {
        this.service = service;
    }

    public void add() {
        log();
        service.add();
    }


    public void delete() {
        log();
        service.delete();
    }

    public void update() {
        log();
        service.update();
    }

    public void query() {
        log();
        service.query();
    }

    void log(){
        System.out.println(new Date());
    }
}
